<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="content">
        <h:panelGrid width="100%">
            <f:facet name="header">Megadog</f:facet>
        </h:panelGrid>

        <h:form >
            <h:panelGrid width="100%" class="direita">
                <h:column>
                    <h:commandButton value="Gravar" action="#{megadogController.verificaAcao()}" />
                </h:column> 
            </h:panelGrid>
            <h:panelGrid columns="3" width="100%">
                <h:outputFormat value="Código "/>
                <h:outputFormat value="Descricao: "/>
                <h:outputFormat value="Valor: "/>
                <h:inputText value="#{megadogController.megadog.id}" style="width: 60px" label="Código" readonly="true"/>
                <h:inputText value="#{megadogController.megadog.descricao}" label="Descrição" required="true">
                    <f:validateLength maximum="60" minimum="3" />
                </h:inputText>
                <h:inputText value="#{megadogController.megadog.valor}" label="Valor" />
            </h:panelGrid>
        </h:form>

    </ui:define>
</ui:composition>
